package org.student.service;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Component;
import org.student.dao.IClassInfoDao;
import org.student.entity.StuSys_Arrange;
import org.student.entity.StuSys_ClassInfo;
import org.student.entity.StuSys_Student;
import org.student.entity.StuSys_Subject;

@Component("IClassInfoService")
public class ClassInfoService implements IClassInfoDao {

	private IClassInfoDao iClassInfoDao;

	@Override
	public void classInfoSave(StuSys_ClassInfo classInfo) throws Exception {
		iClassInfoDao.classInfoSave(classInfo);
	}

	public IClassInfoDao getiClassInfoDao() {
		return iClassInfoDao;
	}

	@Resource(name = "ClassInfoDaoImpl")
	public void setiClassInfoDao(IClassInfoDao iClassInfoDao) {
		this.iClassInfoDao = iClassInfoDao;
	}

	@Override
	public StuSys_ClassInfo findClassInfoByClassId(int classId)
			throws Exception {
		return this.iClassInfoDao.findClassInfoByClassId(classId);
	}

	@Override
	public List<StuSys_ClassInfo> findAllClassInfo() throws Exception {
		return this.iClassInfoDao.findAllClassInfo();
	}

	@Override
	public List<StuSys_Arrange> getInfo(String keyWord) throws Exception {
		return this.iClassInfoDao.getInfo(keyWord);
	}

	@Override
	public List<StuSys_Subject> getSub(String keyword) throws Exception {
		return this.iClassInfoDao.getSub(keyword) ;
	}

	@Override
	public List<StuSys_ClassInfo> getInfoByKeyword(String keyword)
			throws Exception {
		return this.iClassInfoDao.getInfoByKeyword(keyword) ;
	}

	@Override
	public void update_ClassInfo(StuSys_ClassInfo classInfo) throws Exception {
		this.iClassInfoDao.update_ClassInfo(classInfo) ;
	}

	@Override
	public StuSys_ClassInfo getClassInfoById(int id) throws Exception {
		return this.iClassInfoDao.getClassInfoById(id); 
	}
	
}
